HeProCalc algorithm